import { combineReducers } from 'redux-immutable'
import { Map } from 'immutable'
import { reducer as recommendReducer } from '../pages/discover/children/recommend/store'

import { actionType } from './constants'
const defaultState = Map({})
function reducer(state =defaultState,action){
    switch(action.type){
        case actionType.CHANGE_USERINFO:
            return state = Map(action.userInfo)
        default:
            return state
    }
}
const cReducer = combineReducers({
    recommend: recommendReducer,
    userInfo:reducer
})

export default cReducer